<script type="text/javascript">
	function loadBaiTitle(baiId, baiTitle){
		if(baiTitle.length > 9){
			$("#" + baiId).html(baiTitle.substring(0, 9) + "...");
		}else{
			$("#" + baiId).html(baiTitle);
		}
	}
</script>

[#-- 创建站内快讯列表自定义宏。参数说明：par_articleList（站内快讯列表）--]
[#macro ecs_ud_articlelist par_articleList]
	[#if par_articleList ??]
		<ul>
			[#assign i = 0 /]
			[#list par_articleList as data] 
				[#assign i = i + 1 /]
				[#if i < 9]
					<li>
						[
						<a href="${var_contextpath}/articles.xhtml?baiGroup=${data.baiGroup}">${data.bagName}</a>]
						<a id="${data.baiId}" href="${var_contextpath}/articleDetails.xhtml?baiId=${data.baiId}&baiGroup=${data.baiGroup}" title="${data.baiTitle}">
							<script type="text/javascript">
								loadBaiTitle("${data.baiId}", "${data.baiTitle}");
							</script>
						</a>
					</li>
				[/#if]
			[/#list]	
		</ul>
	[/#if]
[/#macro]
